package com.nf.health.app.inquiry.impl.viewholder;

import android.app.Activity;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.nf.health.app.R;
import com.nf.health.app.customview.CircleImageView;
import com.nf.health.app.glide.GlideUtil;
import com.nf.health.app.inquiry.bean.DoctorDetailBean;
import com.nf.health.app.inquiry.bean.SubsDirect;
import com.nf.health.app.utils.GetToast;

import java.util.List;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by Jason on 2016/9/28.
 */
public class DoctorOrderServiceHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
    @Bind(R.id.iv_icon_service)
    public CircleImageView iv_icon_service;
    @Bind(R.id.doctor_descript_top)
    TextView doctor_descript_top;//咨询方式
    ;
    @Bind(R.id.doctor_descript_tbottom)
    TextView doctor_descript_tbottom;//咨询说明


    private Activity cnt;
    public DoctorOrderServiceHolder(View itemView, Activity cnt) {
        super(itemView);
        ButterKnife.bind(this, itemView);
        this.cnt = cnt;
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case  R.id.ll_shouqi_icon_doc:
            case  R.id.tv_query_doc_detail:
                GetToast.useString(cnt, "成功啦");

                break;
        }
    }

    public void loadData(SubsDirect subsDirects){
        if(subsDirects == null){
            return ;
        }
        GlideUtil.loadNetImg2(cnt, iv_icon_service,subsDirects.getHimg(),R.drawable.assess_rb_general_normal);
        doctor_descript_top.setText(TextUtils.isEmpty(subsDirects.getTitle()) ? "未填写" : subsDirects.getTitle());
        doctor_descript_tbottom.setText(TextUtils.isEmpty(subsDirects.getDesc()) ? "未填写" : subsDirects.getDesc());//咨询秒速
    }
}
